{"ast":null,"code":"import isSameUTCWeek from \"../../../../_lib/isSameUTCWeek/index.js\";\nvar accusativeWeekdays = ['воскресенье', 'понедельник', 'вторник', 'среду', 'четверг', 'пятницу', 'субботу'];\nfunction _lastWeek(day) {\n  var weekday = accusativeWeekdays[day];\n  switch (day) {\n    case 0:\n      return \"'в прошлое \" + weekday + \" в' p\";\n    case 1:\n    case 2:\n    case 4:\n      return \"'в прошлый \" + weekday + \" в' p\";\n    case 3:\n    case 5:\n    case 6:\n      return \"'в прошлую \" + weekday + \" в' p\";\n  }\n}\nfunction thisWeek(day) {\n  var weekday = accusativeWeekdays[day];\n  if (day === 2\n  /* Tue */) {\n    return \"'во \" + weekday + \" в' p\";\n  } else {\n    return \"'в \" + weekday + \" в' p\";\n  }\n}\nfunction _nextWeek(day) {\n  var weekday = accusativeWeekdays[day];\n  switch (day) {\n    case 0:\n      return \"'в следующее \" + weekday + \" в' p\";\n    case 1:\n    case 2:\n    case 4:\n      return \"'в следующий \" + weekday + \" в' p\";\n    case 3:\n    case 5:\n    case 6:\n      return \"'в следующую \" + weekday + \" в' p\";\n  }\n}\nvar formatRelativeLocale = {\n  lastWeek: function lastWeek(date, baseDate, options) {\n    var day = date.getUTCDay();\n    if (isSameUTCWeek(date, baseDate, options)) {\n      return thisWeek(day);\n    } else {\n      return _lastWeek(day);\n    }\n  },\n  yesterday: \"'вчера в' p\",\n  today: \"'сегодня в' p\",\n  tomorrow: \"'завтра в' p\",\n  nextWeek: function nextWeek(date, baseDate, options) {\n    var day = date.getUTCDay();\n    if (isSameUTCWeek(date, baseDate, options)) {\n      return thisWeek(day);\n    } else {\n      return _nextWeek(day);\n    }\n  },\n  other: 'P'\n};\nvar formatRelative = function formatRelative(token, date, baseDate, options) {\n  var format = formatRelativeLocale[token];\n  if (typeof format === 'function') {\n    return format(date, baseDate, options);\n  }\n  return format;\n};\nexport default formatRelative;","map":{"version":3,"names":["isSameUTCWeek","accusativeWeekdays","_lastWeek","day","weekday","thisWeek","_nextWeek","formatRelativeLocale","lastWeek","date","baseDate","options","getUTCDay","yesterday","today","tomorrow","nextWeek","other","formatRelative","token","format"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/date-fns/esm/locale/ru/_lib/formatRelative/index.js"],"sourcesContent":["import isSameUTCWeek from \"../../../../_lib/isSameUTCWeek/index.js\";\nvar accusativeWeekdays = ['воскресенье', 'понедельник', 'вторник', 'среду', 'четверг', 'пятницу', 'субботу'];\n\nfunction _lastWeek(day) {\n  var weekday = accusativeWeekdays[day];\n\n  switch (day) {\n    case 0:\n      return \"'в прошлое \" + weekday + \" в' p\";\n\n    case 1:\n    case 2:\n    case 4:\n      return \"'в прошлый \" + weekday + \" в' p\";\n\n    case 3:\n    case 5:\n    case 6:\n      return \"'в прошлую \" + weekday + \" в' p\";\n  }\n}\n\nfunction thisWeek(day) {\n  var weekday = accusativeWeekdays[day];\n\n  if (day === 2\n  /* Tue */\n  ) {\n      return \"'во \" + weekday + \" в' p\";\n    } else {\n    return \"'в \" + weekday + \" в' p\";\n  }\n}\n\nfunction _nextWeek(day) {\n  var weekday = accusativeWeekdays[day];\n\n  switch (day) {\n    case 0:\n      return \"'в следующее \" + weekday + \" в' p\";\n\n    case 1:\n    case 2:\n    case 4:\n      return \"'в следующий \" + weekday + \" в' p\";\n\n    case 3:\n    case 5:\n    case 6:\n      return \"'в следующую \" + weekday + \" в' p\";\n  }\n}\n\nvar formatRelativeLocale = {\n  lastWeek: function lastWeek(date, baseDate, options) {\n    var day = date.getUTCDay();\n\n    if (isSameUTCWeek(date, baseDate, options)) {\n      return thisWeek(day);\n    } else {\n      return _lastWeek(day);\n    }\n  },\n  yesterday: \"'вчера в' p\",\n  today: \"'сегодня в' p\",\n  tomorrow: \"'завтра в' p\",\n  nextWeek: function nextWeek(date, baseDate, options) {\n    var day = date.getUTCDay();\n\n    if (isSameUTCWeek(date, baseDate, options)) {\n      return thisWeek(day);\n    } else {\n      return _nextWeek(day);\n    }\n  },\n  other: 'P'\n};\n\nvar formatRelative = function formatRelative(token, date, baseDate, options) {\n  var format = formatRelativeLocale[token];\n\n  if (typeof format === 'function') {\n    return format(date, baseDate, options);\n  }\n\n  return format;\n};\n\nexport default formatRelative;"],"mappings":"AAAA,OAAOA,aAAa,MAAM,yCAAyC;AACnE,IAAIC,kBAAkB,GAAG,CAAC,aAAa,EAAE,aAAa,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC;AAE5G,SAASC,SAAS,CAACC,GAAG,EAAE;EACtB,IAAIC,OAAO,GAAGH,kBAAkB,CAACE,GAAG,CAAC;EAErC,QAAQA,GAAG;IACT,KAAK,CAAC;MACJ,OAAO,aAAa,GAAGC,OAAO,GAAG,OAAO;IAE1C,KAAK,CAAC;IACN,KAAK,CAAC;IACN,KAAK,CAAC;MACJ,OAAO,aAAa,GAAGA,OAAO,GAAG,OAAO;IAE1C,KAAK,CAAC;IACN,KAAK,CAAC;IACN,KAAK,CAAC;MACJ,OAAO,aAAa,GAAGA,OAAO,GAAG,OAAO;EAAC;AAE/C;AAEA,SAASC,QAAQ,CAACF,GAAG,EAAE;EACrB,IAAIC,OAAO,GAAGH,kBAAkB,CAACE,GAAG,CAAC;EAErC,IAAIA,GAAG,KAAK;EACZ,WACE;IACE,OAAO,MAAM,GAAGC,OAAO,GAAG,OAAO;EACnC,CAAC,MAAM;IACP,OAAO,KAAK,GAAGA,OAAO,GAAG,OAAO;EAClC;AACF;AAEA,SAASE,SAAS,CAACH,GAAG,EAAE;EACtB,IAAIC,OAAO,GAAGH,kBAAkB,CAACE,GAAG,CAAC;EAErC,QAAQA,GAAG;IACT,KAAK,CAAC;MACJ,OAAO,eAAe,GAAGC,OAAO,GAAG,OAAO;IAE5C,KAAK,CAAC;IACN,KAAK,CAAC;IACN,KAAK,CAAC;MACJ,OAAO,eAAe,GAAGA,OAAO,GAAG,OAAO;IAE5C,KAAK,CAAC;IACN,KAAK,CAAC;IACN,KAAK,CAAC;MACJ,O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